package singleton.demo2;

public class test {
    public static void main(String[] args) {
        JiFactory jiFactory = JiFactory.getInstance();
        JiFactory jiFactory2 = JiFactory.getInstance();
        JiFactory jiFactory3 = JiFactory.getInstance();

        Runnable runnable = () -> {
            JiFactory instance = JiFactory.getInstance();
            System.out.println(instance);
        };
        Thread thread = new Thread(runnable);
        Thread thread2 = new Thread(runnable);
        Thread thread3 = new Thread(runnable);
        Thread thread4 = new Thread(runnable);
        Thread thread5 = new Thread(runnable);
        thread2.start();
        thread4.start();
        thread3.start();
        thread.start();
        thread5.start();
//        System.out.println(jiFactory);
//        System.out.println(jiFactory2);
//        System.out.println(jiFactory3);
    }
}
